# coding=utf8

# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# NOTE: This class is auto generated by the jdcloud code generator program.


class MetricDataCm(object):

    def __init__(self, namespace, metric, dimensions, timestamp, type, values, unit=None):
        """
        :param namespace:  命名空间 ，长度不超过255字节，只允许英文、数字、下划线_、点., [0-9][a-z] [A-Z] [. _ ]，  其它会返回err
        :param metric:  监控指标名称，长度不超过255字节，只允许英文、数字、下划线_、点.,  [0-9][a-z] [A-Z] [. _ ]， 其它会返回err
        :param dimensions:  数据维度，数据类型为map类型，支持最少一个，最多6个标签，总长度不大于1024字节，只允许英文、数字、下划线_、点., [0-9][a-z] [A-Z] [. _ ]，  其它会返回err。eg:{"host":"127.0.0.1","region":"cn-north-1","role":"M"}
        :param timestamp:  上报数据点的时间戳,只支持10位，秒级时间戳，不能写入过去30天的时间
        :param type:  数据上报类型，1为原始值
        :param values:  指标值集合，数据类型必须为map类型，key为数据类型，value为数据值，当type=1时，key只能为”value”，上报的是原始值，value内容为整型或浮点型数字，最大值为9223372036854775807
        :param unit: (Optional) 数据的单位，长度不超过64字节，只允许英文、数字、下划线_、点., [0-9][a-z] [A-Z] [. _ ]，  其它会返回err
        """

        self.namespace = namespace
        self.metric = metric
        self.dimensions = dimensions
        self.timestamp = timestamp
        self.type = type
        self.values = values
        self.unit = unit
